package com.liwy3.mybaits.srcDemo;

import com.liwy3.mybaits.domain.SysUser;
import org.apache.ibatis.type.JdbcType;
import org.apache.ibatis.type.TypeHandler;

import java.sql.CallableStatement;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * Copyright © 元气森林（北京）食品科技集团有限公司. All rights reserved.
 *
 * @Description:
 * @author: Crazy4J
 * @date: 2022年02月14日 15:48
 * @version: V1.0
 */
//@Component
public class MyTypeHandler  implements TypeHandler<SysUser> {


    @Override
    public void setParameter(PreparedStatement ps, int i, SysUser parameter, JdbcType jdbcType) throws SQLException {
        System.out.println("=====================执行setParameter=====================");
    }

    @Override
    public SysUser getResult(ResultSet rs, String columnName) throws SQLException {
        System.out.println("=====================执行getResult --columnName=====================");
        return null;
    }

    @Override
    public SysUser getResult(ResultSet rs, int columnIndex) throws SQLException {
        System.out.println("=====================执行getResult --columnIndex=====================");
        return null;
    }

    @Override
    public SysUser getResult(CallableStatement cs, int columnIndex) throws SQLException {
        System.out.println("=====================执行getResult -- CallableStatement --columnIndex=====================");
        return null;
    }
}
